import Cookies from 'js-cookie'

const TokenKey = 'accessToken'
const RefreshToken = 'refreshToken'
const UserId = 'userid'

export function setCookieAccessToken(token) {
  Cookies.set(TokenKey, token)
}

export function getCookieAccessToken() {
  return Cookies.get(TokenKey)
}

export function getCookieRefreshToken() {
  return Cookies.get(RefreshToken)
}

export function setCookieRefreshToken(token) {
  Cookies.set(RefreshToken, token)
}

export function getCookieUserId() {
  return Cookies.get(UserId)
}

export function setCookieUserId(userId) {
  Cookies.set(UserId, userId)
}

export function removeCookieToken() {
  Cookies.remove(TokenKey)
  Cookies.remove(RefreshToken)
}

export function removeCookieUserId() {
  Cookies.remove(UserId)
}

